xen/serial: setup UART idle mode for OMAP
authorOleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
Mon, 8 Dec 2014 13:51:47 +0000 (15:51 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 16 Dec 2014 12:41:06 +0000 (12:41 +0000)
commitdcd84861b0b01b8895716d4c803c9d24c31c8cab
treec26b9b88bb203851b993cbe5e2db3bb180a142b6
parent6c9b27d3f363889718e7e046511383927f257095
xen/serial: setup UART idle mode for OMAP

The UART is not able to receive bytes when idle mode is not configured
properly, therefore setup the UART with autoidle and wakeup enabled.

Older Linux kernels (for example 3.8) configure hwmods for all devices
even if the device tree nodes for those devices is absent in device
tree, thus UART idle mode is configured too.  With such kernels we can
workaround the issue by adding a fake node in the UART containing this
MMIO range, which is therefore mapped by Xen to dom0, which
reconfigures the UART, causing things to work normally.

Newer Linux Kernels (3.12 and beyond) do not configure idle mode for
UART and so this hack no longer works.

Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- updated commit message as discussed ]
xen/drivers/char/omap-uart.c
xen/include/xen/8250-uart.h